<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>Insert title here</title>
</head>
<body>

	<div class="content-wrapper" th:fragment="profileDocCheckIn">

	<h3>文档检入</h3>
		<div class="panel panel-default">
			<div class="panel-heading"></div>
			<div class="panel-body">
				<form id="dcoForm" method="post" th:action="@{/docCheckIn/upload}" enctype="multipart/form-data"  class="form-horizontal">
					<fieldset>
					
						<div class="form-group"  style="margin-top: 10px;margin-bottom: 10px;">
							<label for="input-id-1" class="col-sm-1 control-label">文档类型</label>
							<div class="col-sm-4">
								<select  name="docType" id="docType" class="form-control m-b">
									<option th:each="docType,status:${docTypeList}" th:value="${docTypeList[__${status.index}__].dictkeyValue}" th:text="${docTypeList[__${status.index}__].dictkeyName}"></option>
								</select>
							</div>
						</div>
						<div class="form-group"  style="margin-top: 10px;margin-bottom: 10px;">
							<label for="input-id-1" required="" minlength="1" class="col-sm-1 control-label">*文档标题</label>
							<div class="col-sm-4">
								<input type="text" id="docTitle" required="" minlength="1"  name='docTitle' class="form-control" />
							</div>
						</div>
						<div class="form-group"  style="margin-top: 10px;margin-bottom: 10px;">
							<label for="input-id-1" class="col-sm-1 control-label">作者</label>
							<div class="col-sm-4">
								<input type="text" id="docAuthor" required="" minlength="1"  name='docAuthor' th:value="${displayName}" class="form-control" />
							</div>
						</div>

						<div class="form-group"  style="margin-top: 10px;margin-bottom: 10px;">
							<label for="input-id-1" class="col-sm-1 control-label">*安全组</label>
							<div class="col-sm-4">
								<select  name="docGroup" id="docGroup" class="form-control m-b">
									<option th:each="groupObj,group:${groupList}" th:value="${groupList[__${group.index}__].groupId}" th:text="${groupList[__${group.index}__].groupName}"></option>
								</select>
							</div>
						</div>
					</fieldset>

					<fieldset>
						<div class="form-group">
							<label class="col-sm-1 control-label">*上传文件</label>
							<div class="col-sm-4">
								<label class="radio-inline c-radio"> 
									<input id="uploadMode1"  type="radio" name="uploadMode" value="1" checked=''/> 
									<span class="fa fa-circle"></span>本地文件
								</label> 
								<label class="radio-inline c-radio"> 
									<input id="uploadMode2" type="radio" name="uploadMode" value="2" /> 
									<span class="fa fa-circle"></span>服务器文件
							    </label> 
								<br/>
								<div id="selectFile">
								
								</div>
							</div>
						</div>
						<div th:replace="doc/list/serverFileList :: FolderListBtn"></div>

					</fieldset>

					<fieldset>

						<div class="form-group">
							<label for="input-id-1" class="col-sm-1 control-label">简介</label>
							<div class="col-sm-4">
								<textarea class="form-control" id="docSummary" name="docSummary"  rows="3"></textarea>
							</div>
						</div>

					</fieldset>
					
					<input type="hidden" id="profileId" name="profileId" th:value="${profileId}"/>
					<fieldset class="profileMetaData" th:id="${filesetList[__${fileset.index}__].fieldsetId}" th:each="fobj,fileset:${filesetList}"  >
						
					
						<div  th:each="obj,metaDate:${filesetList[__${fileset.index}__].metaDataDtoList}"  style="margin-top: 10px;margin-bottom: 10px;" class="form-group">
							<label th:if="${ filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='0'}" for="input-id-1"  th:text="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataName}"  class="col-sm-1 control-label"></label>
							
							<label th:if="${ filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='1'}" for="input-id-1"  th:text="|*${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataName}|"  class="col-sm-1 control-label"></label>
							
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='text' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='1' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='0'}"  class="col-sm-4">
								<input type="text" th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control" />
							 </div>
							
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='text' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='1' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='1'}"  class="col-sm-4">
								<input type="text" required="" minlength="1"   th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control" />
							 </div>
							 
							 
							
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='text' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='2'}"  class="col-sm-4">
								<select th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}"  th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control selectData" >
								</select>
								<input type="hidden" th:id="|${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}_data|" th:name='|${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}_data|' th:value='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].selectData}' />
							</div>
							
							
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='number' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='1' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='0'}"  class="col-sm-4">
								<input type="text" th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control" />
							</div>
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='number' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='1' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='1'}"  class="col-sm-4">
								<input type="text" required="" minlength="1" th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control" />
							</div>
							
							
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='number' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].importMode=='2'}"  class="col-sm-4">
								<select th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control selectData" >
								
								</select>
								<input type="hidden" th:id="|${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}_data|" th:name='|${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}_data|' th:value='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].selectData}' />
								
							</div>
							
							 <div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='textarea'  and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='0'}"  class="col-sm-4">
								<textarea class="form-control"  th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' rows="3"></textarea>
							</div>
							
							
							
							<div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='textarea'  and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='1'}"  class="col-sm-4">
								<textarea class="form-control" required="" minlength="1"   th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' rows="3"></textarea>
							</div>
							 
							 
							
							  
							<div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='date' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='0'}"  class="col-sm-4">
							
							 <div  class="input-group date dateclass">
                                 <input type="text"  th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control"/>
                                 <span class="input-group-addon">
                                    <span class="fa fa-calendar"></span>
                                 </span>
                              </div>
                              
                              
							</div>
							
							
							<div th:if="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataType=='date' and filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].isRequire=='1'}" class="col-sm-4">
							
							 <div  class="input-group date dateclass">
                                 <input type="text"  required="" minlength="1"   th:id="${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}" th:name='${filesetList[__${fileset.index}__].metaDataDtoList[__${metaDate.index}__].metadataTag}' class="form-control"/>
                                 <span class="input-group-addon">
                                    <span class="fa fa-calendar"></span>
                                 </span>
                              </div>
                              
                              
							</div>
							
							
							
						</div>
					
					</fieldset>
					
					

						<fieldset>
						<div class="form-group ">
						<label for="input-id-1" class="col-sm-1 control-label"></label>
							<div class="col-sm-4 ">
								<button type="button" class="btn btn-primary pull-right"   id="submitBtn">保存</button>
								<button type="button" class="btn btn-default pull-right mr-sm"   id="returnBtn">返回</button>
								
							</div>
						</div>
					</fieldset>
					
				</form>

			</div>
		</div>




	</div>

	<div th:fragment="profileDocCheckIn_dialog">
		<div th:replace="doc/list/serverFileList :: serverFileList"></div>
		<div th:replace="doc/list/serverFileList :: serverFolderList"></div>
		
	</div>
	<div th:fragment="profileDocCheckIn_js">

		<script type="text/javascript" th:src="@{/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js}"></script>
		<script th:src="@{/bootstrap-filestyle/src/bootstrap-filestyle.js}"></script>
	    <!-- bootstrapTree -->
		<script th:src="@{/business/bootstrapTree/bootstrap-treeview.js}"></script>
	    <script th:src="@{/business/doc/list/serverFileList.js}"></script>
		<script th:src="@{/business/doc/profileDocCheckIn.js}"></script>


	</div>
	<div th:fragment="profileDocCheckIn_css">

	</div>

</body>
</html>